<h1><?=$this->translate->_('header_mod_bans')?></h1>

<?if($this->count  > 0):?>
	<br />
	<table summary="bans">
	<tr>
		<th width="100px;"><?=$this->translate->_('moderation_bans_user')?></th>
		<th width="200px"><?=$this->translate->_('moderation_bans_thread')?></th>
		<th width="100px"><?=$this->translate->_('moderation_bans_board')?></th>
		<th width="150px"><?=$this->translate->_('moderation_bans_date')?></th>
		<th width="150px"><?=$this->translate->_('moderation_bans_reason')?></th>
		<th width="40px"></th>
	</tr>
	<?foreach($this->results AS $result):?>
	<tr>
		<td style="font-size:0.8em;"><?=$this->getAuthor($result['user_uid'])?></td>
		<td style="font-size:0.8em;"><a href="<?=$this->url(array('controller' => 'posts', 'uid' => $result['thread_uid'], 'title' => str_replace(' ', '_', $this->getThreadTitle($result['thread_uid']))), 'threads', true);?>"><?=$this->escape($this->getThreadTitle($result['thread_uid']))?></a></td>
		<td style="font-size:0.8em;"><?if($result['board_uid'] == 'all'): echo $this->translate->_('moderation_bans_allboard'); else: echo $this->getBoardTitle($result['board_uid']); endif;?></td>
		<td style="font-size:0.8em;"><?=$this->datetime($result['create_date'])?> / <?=$this->datetime($result['expire_date'])?></td>
		<td style="font-size:0.8em;"><?=$this->escape($result['reason'])?></td>
		<td class="center"><a href="<?=$this->url(array('module' => 'backend', 'controller' => 'ban', 'action' => 'edit', 'uid' => $result['uid']), 'default', true);?>"><img src="<?=$this->baseUrl()?>/static/gfx/icons/pencil.png" alt="Edit" /></a> 
		<?if($result['is_deleted'] == 1):?>
			<img src="<?=$this->baseUrl()?>/static/gfx/icons/lock_open.png" alt="Ban is deleted" />
		<?else:?>
			<img src="<?=$this->baseUrl()?>/static/gfx/icons/lock.png" alt="Ban is active" />
		<?endif;?>
	</tr>
	<?endforeach;?>
	</table>
<?else:?>
	<p class="notice"><?=$this->translate->_('moderation_bans_error')?></p>
<?endif;?>